<?php

class WebsiteController extends MyController
{
	function init() { 
		parent::init();
	}
	
	function actionIndex()
	{	
		$this->redirect(array($this->controller_id.'/view'));
	}
	
	function actionView()
	{	
		$row = website::model()->findByPk(1);
		$this->data["row"] = $row;
		$this->render("view", $this->data);
	}
	
	function actionSave()
	{
		$row = website::model()->findByPk(1);
		$row->setAttributes($_POST, false);
		$row->save();
		$this->redirect(array($this->controller_id."/view"));
	}
	
}